package research;

import java.util.List;

public class BipartiteGraph {
	private List<Vertex> qVertices;
	private List<Vertex> cVertices;
	private List<Edge> forwardEdges;
	private List<Edge> backwardEdges;

	public BipartiteGraph(List<Vertex> qVertices, List<Vertex> cVertices, List<Edge> forwardEdges, List<Edge> backwardEdges) {
		this.qVertices = qVertices;
		this.cVertices = cVertices;
		this.forwardEdges = forwardEdges;
		this.backwardEdges = backwardEdges;
	}

	public List<Vertex> getQueryVertices() {
		return qVertices;
	}
	
	public void setQueryVertices(List<Vertex> qVertices){
		this.qVertices = qVertices;
	}
	
	public List<Vertex> getClickVertices() {
		return cVertices;
	}
	
	public void setClickVertices(List<Vertex> cVertices){
		this.cVertices = cVertices;
	}

	public List<Edge> getForwardEdges() {
		return forwardEdges;
	}
	
	public void setForwardEdges(List<Edge> edges){
		this.forwardEdges = edges;
	}
	
	public List<Edge> getBackwardEdges() {
		return backwardEdges;
	}
	
	public void setBackwardEdges(List<Edge> edges){
		this.backwardEdges = edges;
	}
	
	public Edge getEdge(Vertex nodeA, Vertex nodeB, List<Edge> edges){
		for(Edge edge:edges){
			if(edge.getSource().equals(nodeA) && edge.getDestination().equals(nodeB)){
				return edge;
			}
		}
		return null;
	}
	
	public enum VERTEX_TYPE{
		Q_VERTEX, C_VERTEX
	}
	
}
